
$(function() {
	getProjectVersionInfo();
});

function getProjectVersionInfo() {
	var versionId1 = $("#versionId1").val();
	var versionId2 = $("#versionId2").val();
	
	$.ajax({
		url : 'project!getProjectVersionInfo.action',
		dataType: 'json',
		data: {
			"versionId1": versionId1,
			"versionId2": versionId2
		},
		success : function(data) {
			Interceptor(data);
		     if(data!=null) {
		     
		     	// 版本信息1
		     	$("#versionTime1").html(data[0].projectVersion1.versionTime);
		     	var versionStatusStr1='';
		     	if(data[0].projectVersion1.versionStatus=='0') {
		     		versionStatusStr1 = '待审核';
		     	}else if(data[0].projectVersion1.versionStatus=='1') {
		     		versionStatusStr1 = '审核通过';
		     	}else if(data[0].projectVersion1.versionStatus=='2') {
		     		versionStatusStr1 = '审核不通过';
		     	}
		     	$("#versionStatus1").html(versionStatusStr1);
		     	$("#versionNumber1").html('Version' + data[0].projectVersion1.versionNumber);
		     	if(data[0].projectVersion1.versionAuditUser!=null) {
		     	    $("#ul_versionAuditUser1").show();
		     	    $("#ul_versionAuditReason1").show();
		     		$("#versionAuditUser1").html(data[0].projectVersion1.versionAuditUser.name);
		     		$("#versionAuditReason1").html(data[0].projectVersion1.versionAuditReason);
		     	}
		     	
		        //机构信息
		    	$("#li_name1").html(data[0].projectVersion1.organization.name);
		    	$("#li_organType1").html(data[0].projectVersion1.organization.organType);
		    	$("#li_organLevel1").html(data[0].projectVersion1.organization.organLevel);
		    	$("#li_province1").html(data[0].projectVersion1.organization.province.name);
		    	$("#li_organCode1").html(data[0].projectVersion1.organization.organCode);
		    	$("#li_address1").html(data[0].projectVersion1.organization.address);
		    	$("#li_postCode1").html(data[0].projectVersion1.organization.postCode);
		    	$("#li_contactUser1").html(data[0].projectVersion1.organization.contactUser);
		    	$("#li_contactPhone1").html(data[0].projectVersion1.organization.contactPhone);
		    	$("#li_contactMobile1").html(data[0].projectVersion1.organization.contactMobile);
		    	$("#li_contactEmail1").html(data[0].projectVersion1.organization.contactEmail);
		    	
		    	//项目信息
		    	$("#name1").html(data[0].projectVersion1.name);
		    	$("#regNumber1").html(data[0].projectVersion1.regNumber);
		    	$("#keywords1").html(data[0].projectVersion1.keywords);
		    	$("#sourceType1").html(data[0].projectVersion1.sourceType);
		    	if(data[0].projectVersion1.sourceType=='国家级') {
		    		$("#ul_sourceTypeSec1").show();
		    		$("#sourceTypeSec1").html(data[0].projectVersion1.sourceTypeSec);
		    	}
		    	$("#sponsors1").html(data[0].projectVersion1.sponsors);
		    	
		    	//项目组织信息
		    	if(data[0].projectOrganizationVersion1!=null) {
		    		$("#principalName1").html(data[0].projectOrganizationVersion1.principalName);
		    		$("#principaCertificateType1").html(data[0].projectOrganizationVersion1.principaCertificateType);
		    		$("#principaCertificateNumber1").html(data[0].projectOrganizationVersion1.principaCertificateNumber);
		    		$("#principaTelephone1").html(data[0].projectOrganizationVersion1.principaTelephone);
		    		$("#principaPhone1").html(data[0].projectOrganizationVersion1.principaPhone);
		    		$("#principaEmail1").html(data[0].projectOrganizationVersion1.principaEmail);
		    	}
		    	
		    	// 伦理审查信息
		    	if(data[0].projectEthicVersion1!=null) {
		    		$("#ethicName1").html(data[0].projectEthicVersion1.name);
		    		if(data[0].projectEthicVersion1.isRecords=='1') {
		    			$("#isRecords1").html("是");
		    		}else if(data[0].projectEthicVersion1.isRecords=='0') {
		    			$("#isRecords1").html("否");
		    		}
		    		$("#provinceCode1").html(data[0].projectEthicProvinceName1);
		    		$("#auditDate1").html(data[0].projectEthicVersion1.auditDate);
		    		$("#approvalNumber1").html(data[0].projectEthicVersion1.approvalNumber);
		    		$("#ethicTelephone1").html(data[0].projectEthicVersion1.telephone);
		    		$("#ethicEmail1").html(data[0].projectEthicVersion1.email);
		    		if(data[0].projectEthicVersion1.approvalFilePath!='') {
		    			$("#tteeFilePath_span1").html('<a href="' + data[0].projectEthicVersion1.approvalFilePath + '" target="_blank" >查看附件</a>');
		    		}
		    		
		    	}
		    	// 研究设计信息
		    	$("#researchPurpose1").html(data[0].projectVersion1.researchPurpose);
		    	$("#researchScheme1").html(data[0].projectVersion1.researchScheme);
		    	$("#researchType1").html(data[0].projectVersion1.researchType);
		    	
		    	if(data[0].projectVersion1.researchType=='观察性研究') {
		    		$("#ul_researchType_gc1").show();
		    		$("#researchDesignTimer1").html(data[0].projectVersion1.researchDesignTimer);
		    	}else if(data[0].projectVersion1.researchType=='干预性研究') {
		    		// 组信息列表
		    		$("#div_group_domain1").show();
		    		var group_domainStr = '<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>研究小组信息 &gt;&gt;</DIV>';
		    		if(data[0].projectGroupVersionList1!=null) {
			    		$(data[0].projectGroupVersionList1).each(function(i) {
			    			group_domainStr += '<ul class="class_researchType_gy" style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
										      + '<li class="name">组别名称：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList1[i].groupName
										      + '</li>'
										      + '<li class="name">满足条件：</li>'
										      + '<li class="inpu">'
										      +  data[0].projectGroupVersionList1[i].groupConditions
										      + '</li>'
										      + '<li class="name">干预类型：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList1[i].interventionType
										      + '</li>'
										      + '<li class="name">干预措施：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList1[i].interventionMeasures
										      + '</li>'
										    + '</ul>'
			    		});
			    	}
			    	$("#div_group_domain1").html(group_domainStr);
		    	}else if(data[0].projectVersion1.researchType=='其他') {
		    		$("#ul_researchType_qt1").show();
		    		$("#researchTypeInfo1").html(data[0].projectVersion1.researchTypeInfo);
		    	}
		    	
		    	$("#researchDesignStartAndEnd1").html(data[0].projectVersion1.researchDesignStart + " 至 " + data[0].projectVersion1.researchDesignEnd);
		    	// 研究领域
		    	var researchDomainStr1 = '';
		    	var researchDomainSecStr1 = '';
		    	// 判断一级
		    	if(data[0].projectVersion1.researchDomain=='1001') {
		    		researchDomainStr1='基础医学';
		    	}else if(data[0].projectVersion1.researchDomain=='1002') {
		    		researchDomainStr1='临床医学';
		    	}else if(data[0].projectVersion1.researchDomain=='1003') {
		    		researchDomainStr1='口腔医学';
		    	}else if(data[0].projectVersion1.researchDomain=='1004') {
		    		researchDomainStr1='公共卫生与预防医学';
		    	}else if(data[0].projectVersion1.researchDomain=='1005') {
		    		researchDomainStr1='中医学';
		    	}else if(data[0].projectVersion1.researchDomain=='1006') {
		    		researchDomainStr1='中西医结合';
		    	}else if(data[0].projectVersion1.researchDomain=='1007') {
		    		researchDomainStr1='药学';
		    	}else if(data[0].projectVersion1.researchDomain=='1008') {
		    		researchDomainStr1='中药学';
		    	}
		    	// 判断二级
		    	if(data[0].projectVersion1.researchDomainSec=='100101') {researchDomainSecStr1='人体解剖与组织胚胎学';}
				else if(data[0].projectVersion1.researchDomainSec=='100102') {researchDomainSecStr1='免疫学';}
				else if(data[0].projectVersion1.researchDomainSec=='100103') {researchDomainSecStr1='病原生物学';}
				else if(data[0].projectVersion1.researchDomainSec=='100104') {researchDomainSecStr1='病理学与病理生理学';}
				else if(data[0].projectVersion1.researchDomainSec=='100105') {researchDomainSecStr1='法医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100106') {researchDomainSecStr1='放射医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100107') {researchDomainSecStr1='航空、航天与航海医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100201') {researchDomainSecStr1='内科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100202') {researchDomainSecStr1='儿科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100203') {researchDomainSecStr1='老年医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100204') {researchDomainSecStr1='神经病学';}
				else if(data[0].projectVersion1.researchDomainSec=='100205') {researchDomainSecStr1='精神病与精神卫生学';}
				else if(data[0].projectVersion1.researchDomainSec=='100206') {researchDomainSecStr1='皮肤病与性病学';}
				else if(data[0].projectVersion1.researchDomainSec=='100207') {researchDomainSecStr1='影像医学与核医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100208') {researchDomainSecStr1='临床检验诊断学';}
				else if(data[0].projectVersion1.researchDomainSec=='100209') {researchDomainSecStr1='护理学';}
				else if(data[0].projectVersion1.researchDomainSec=='100210') {researchDomainSecStr1='外科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100211') {researchDomainSecStr1='妇产科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100212') {researchDomainSecStr1='眼科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100213') {researchDomainSecStr1='耳鼻咽喉科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100214') {researchDomainSecStr1='肿瘤学';}
				else if(data[0].projectVersion1.researchDomainSec=='100215') {researchDomainSecStr1='康复医学与理疗学';}
				else if(data[0].projectVersion1.researchDomainSec=='100216') {researchDomainSecStr1='运动医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100217') {researchDomainSecStr1='麻醉学';}
				else if(data[0].projectVersion1.researchDomainSec=='100218') {researchDomainSecStr1='急诊医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100301') {researchDomainSecStr1='口腔基础医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100302') {researchDomainSecStr1='口腔临床医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100401') {researchDomainSecStr1='流行病与卫生统计学';}
				else if(data[0].projectVersion1.researchDomainSec=='100402') {researchDomainSecStr1='劳动卫生与环境卫生学';}
				else if(data[0].projectVersion1.researchDomainSec=='100403') {researchDomainSecStr1='营养与食品卫生学';}
				else if(data[0].projectVersion1.researchDomainSec=='100404') {researchDomainSecStr1='儿少卫生与妇幼保健学';}
				else if(data[0].projectVersion1.researchDomainSec=='100405') {researchDomainSecStr1='卫生毒理学';}
				else if(data[0].projectVersion1.researchDomainSec=='100406') {researchDomainSecStr1='军事预防医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100501') {researchDomainSecStr1='中医基础理论';}
				else if(data[0].projectVersion1.researchDomainSec=='100502') {researchDomainSecStr1='中医临床基础';}
				else if(data[0].projectVersion1.researchDomainSec=='100503') {researchDomainSecStr1='中医医史文献';}
				else if(data[0].projectVersion1.researchDomainSec=='100504') {researchDomainSecStr1='方剂学';}
				else if(data[0].projectVersion1.researchDomainSec=='100505') {researchDomainSecStr1='中医诊断学';}
				else if(data[0].projectVersion1.researchDomainSec=='100506') {researchDomainSecStr1='中医内科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100507') {researchDomainSecStr1='中医外科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100508') {researchDomainSecStr1='中医骨伤科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100509') {researchDomainSecStr1='中医妇科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100510') {researchDomainSecStr1='中医儿科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100511') {researchDomainSecStr1='中医五官科学';}
				else if(data[0].projectVersion1.researchDomainSec=='100512') {researchDomainSecStr1='针灸推拿学';}
				else if(data[0].projectVersion1.researchDomainSec=='100513') {researchDomainSecStr1='民族医学';}
				else if(data[0].projectVersion1.researchDomainSec=='100601') {researchDomainSecStr1='中西医结合基础';}
				else if(data[0].projectVersion1.researchDomainSec=='100602') {researchDomainSecStr1='中西医结合临床';}
				else if(data[0].projectVersion1.researchDomainSec=='100701') {researchDomainSecStr1='药物化学';}
				else if(data[0].projectVersion1.researchDomainSec=='100702') {researchDomainSecStr1='药剂学';}
				else if(data[0].projectVersion1.researchDomainSec=='100703') {researchDomainSecStr1='生药学';}
				else if(data[0].projectVersion1.researchDomainSec=='100704') {researchDomainSecStr1='药物分析学';}
				else if(data[0].projectVersion1.researchDomainSec=='100705') {researchDomainSecStr1='微生物与生化药学';}
				else if(data[0].projectVersion1.researchDomainSec=='100706') {researchDomainSecStr1='药理学';}
		    	
		    	if(researchDomainSecStr1!='') {
		    		$("#researchDomain1").html(researchDomainStr1 + " &nbsp;&nbsp; 二级学科：" + researchDomainSecStr1);
		    	}else {
		    		$("#researchDomain1").html(researchDomainStr1);
		    	}
		    	
		    	// 主要结局指标信息
		    	if(data[0].projectIndicatorMainVersion1!=null) {
		    		$("#indicatorNameMain1").html(data[0].projectIndicatorMainVersion1.indicatorName);
    			  	$("#indicatorDescriptionMain1").html(data[0].projectIndicatorMainVersion1.indicatorDescription);
    			  	$("#indicatorTypeMain1").html(data[0].projectIndicatorMainVersion1.indicatorType);
		    	}
		    	// 次要结局指标信息
		    	var ciyao_domainStr1='';
		    	if(data[0].projectIndicatorListMinorVersion1!=null) {
		    		if(data[0].projectIndicatorListMinorVersion1.length>0) {
		    			ciyao_domainStr1+='<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>次要结局指标 &gt;&gt;</DIV>';
		    		}
		    		$(data[0].projectIndicatorListMinorVersion1).each(function(i) {
		    		  ciyao_domainStr1 +='<ul style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
									  +'<li class="name">结局指标名称：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion1[i].indicatorName
									  +'</li>'
									  +'<li class="name">结局指标描述：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion1[i].indicatorDescription
									  +'</li>'
									  +'<li class="name">结局指标类型：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion1[i].indicatorType   
									  +'</li>'
									  +'</ul>';
		    		});
		    	}
		    	$("#div_ciyao_indicator_domain1").html(ciyao_domainStr1);
		    	// 其他结局指标信息
		    	var qita_domainStr1='';
		    	if(data[0].projectIndicatorListElseVersion1!=null) {
		    		if(data[0].projectIndicatorListElseVersion1.length>0) {
		    			qita_domainStr1+='<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>其他结局指标 &gt;&gt;</DIV>';
		    		}
		    		$(data[0].projectIndicatorListElseVersion1).each(function(i) {
		    			 qita_domainStr1 +='<ul style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
									  +'<li class="name">结局指标名称：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion1[i].indicatorName
									  +'</li>'
									  +'<li class="name">结局指标描述：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion1[i].indicatorDescription
									  +'</li>'
									  +'<li class="name">结局指标类型：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion1[i].indicatorType   
									  +'</li>'
									  +'</ul>';
		    		});
		    	}
		    	$("#div_qita_indicator_domain1").html(qita_domainStr1);
		    	
		    	//研究对象信息
		    	$("#researchDesignTimer1").html(data[0].projectVersion1.researchDesignTimer);
		    	$("#researchObjectInfo1").html(data[0].projectVersion1.researchObjectInfo);
		    	$("#researchObjectSample1").html(data[0].projectVersion1.researchObjectSample);
		    	$("#inclusionCriteria1").html(data[0].projectVersion1.inclusionCriteria);
		    	$("#exclusionCriteria1").html(data[0].projectVersion1.exclusionCriteria);
		    	$("#sexPreference1").html(data[0].projectVersion1.sexPreference);
		    	$("#minAge1").html(data[0].projectVersion1.minAge);
		    	$("#maxAge1").html(data[0].projectVersion1.maxAge);
		    	// 招募状态
		    	var researchObjectStatus1 = '';
		    	if(data[0].projectVersion1.researchObjectStatus=='0') {
		    		researchObjectStatus1 = '未开始募集';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='1') {
		    		researchObjectStatus1 = '正在募集中';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='2') {
		    		researchObjectStatus1 = '正在邀请以确定的研究对象入选，而不公开募集';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='3') {
		    		researchObjectStatus1 = '项目进行中，但不再募集研究对象';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='4') {
		    		researchObjectStatus1 = '项目已结束';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='5') {
		    		researchObjectStatus1 = '募集被中断暂停，之后可能继续';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='6') {
		    		researchObjectStatus1 = '募集被中止，之后不会继续';
		    	}else if(data[0].projectVersion1.researchObjectStatus=='7') {
		    		researchObjectStatus1 = '募集被取消';
		    	}
		    	$("#researchObjectStatus1").html(researchObjectStatus1);
		    	
		    	$("#researchObjectStart1").html(data[0].projectVersion1.researchObjectStart);
		    	$("#researchObjectEnd1").html(data[0].projectVersion1.researchObjectEnd);
		    	$("#sampleType1").html(data[0].projectVersion1.sampleType);
		    	$("#sampleInfo1").html(data[0].projectVersion1.sampleInfo);
		    	// 其他信息
		    	$("#websiteName1").html(data[0].projectVersion1.websiteName);
		    	$("#websiteUrl1").html(data[0].projectVersion1.websiteUrl);
		    	$("#thesisType1").html(data[0].projectVersion1.thesisType);
		    	if(data[0].projectVersion1.thesisFilePath!='') {
		    		$("#thesisFilePath_span1").html('<a href="' + data[0].projectVersion1.thesisFilePath + '" target="_blank" >查看附件</a>');
		    	}
		    	if(data[0].projectVersion1.isStemCellProjects!=null && data[0].projectVersion1.isStemCellProjects=='1') {
		    		$("#isStemCellProjects1").html("是");
		    	}else {
		    		$("#isStemCellProjects1").html("否");
		    	}
		    	
		    	// 版本信息2
		    	$("#versionTime2").html(data[0].projectVersion2.versionTime);
		     	var versionStatusStr2='';
		     	if(data[0].projectVersion2.versionStatus=='0') {
		     		versionStatusStr2 = '待审核';
		     	}else if(data[0].projectVersion2.versionStatus=='2') {
		     		versionStatusStr2 = '审核通过';
		     	}else if(data[0].projectVersion2.versionStatus=='2') {
		     		versionStatusStr2 = '审核不通过';
		     	}
		     	$("#versionStatus2").html(versionStatusStr2);
		     	$("#versionNumber2").html('Version' + data[0].projectVersion2.versionNumber);
		     	if(data[0].projectVersion2.versionAuditUser!=null) {
		     	    $("#ul_versionAuditUser2").show();
		     	    $("#ul_versionAuditReason2").show();
		     		$("#versionAuditUser2").html(data[0].projectVersion2.versionAuditUser.name);
		     		$("#versionAuditReason2").html(data[0].projectVersion2.versionAuditReason);
		     	}
		     	
		        //机构信息
		    	$("#li_name2").html(data[0].projectVersion2.organization.name);
		    	$("#li_organType2").html(data[0].projectVersion2.organization.organType);
		    	$("#li_organLevel2").html(data[0].projectVersion2.organization.organLevel);
		    	$("#li_province2").html(data[0].projectVersion2.organization.province.name);
		    	$("#li_organCode2").html(data[0].projectVersion2.organization.organCode);
		    	$("#li_address2").html(data[0].projectVersion2.organization.address);
		    	$("#li_postCode2").html(data[0].projectVersion2.organization.postCode);
		    	$("#li_contactUser2").html(data[0].projectVersion2.organization.contactUser);
		    	$("#li_contactPhone2").html(data[0].projectVersion2.organization.contactPhone);
		    	$("#li_contactMobile2").html(data[0].projectVersion2.organization.contactMobile);
		    	$("#li_contactEmail2").html(data[0].projectVersion2.organization.contactEmail);
		    	
		    	//项目信息
		    	$("#name2").html(data[0].projectVersion2.name);
		    	if(data[0].projectVersion1.name!=data[0].projectVersion2.name) {
		    		$("#name2").addClass('red');
		    	}
		    	$("#regNumber2").html(data[0].projectVersion2.regNumber);
		    	$("#keywords2").html(data[0].projectVersion2.keywords);
		    	if(data[0].projectVersion1.keywords!=data[0].projectVersion2.keywords) {
		    		$("#keywords2").addClass('red');
		    	}
		    	$("#sourceType2").html(data[0].projectVersion2.sourceType);
		    	if(data[0].projectVersion1.sourceType!=data[0].projectVersion2.sourceType) {
		    		$("#sourceType2").addClass('red');
		    	}
		    	if(data[0].projectVersion2.sourceType=='国家级') {
		    		$("#ul_sourceTypeSec2").show();
		    		$("#sourceTypeSec2").html(data[0].projectVersion2.sourceTypeSec);
		    		if(data[0].projectVersion1.sourceTypeSec!=data[0].projectVersion2.sourceTypeSec) {
			    		$("#sourceTypeSec2").addClass('red');
			    	}
		    	}
		    	$("#sponsors2").html(data[0].projectVersion2.sponsors);
		    	if(data[0].projectVersion1.sponsors!=data[0].projectVersion2.sponsors) {
		    		$("#sponsors2").addClass('red');
		    	}
		    	
		    	//项目组织信息
		    	if(data[0].projectOrganizationVersion2!=null) {
		    		$("#principalName2").html(data[0].projectOrganizationVersion2.principalName);
		    		if(data[0].projectOrganizationVersion1.principalName!=data[0].projectOrganizationVersion2.principalName) {
			    		$("#principalName2").addClass('red');
			    	}
		    		$("#principaCertificateType2").html(data[0].projectOrganizationVersion2.principaCertificateType);
		    		if(data[0].projectOrganizationVersion1.principaCertificateType!=data[0].projectOrganizationVersion2.principaCertificateType) {
			    		$("#principaCertificateType2").addClass('red');
			    	}
		    		$("#principaCertificateNumber2").html(data[0].projectOrganizationVersion2.principaCertificateNumber);
		    		if(data[0].projectOrganizationVersion1.principaCertificateNumber!=data[0].projectOrganizationVersion2.principaCertificateNumber) {
			    		$("#principaCertificateNumber2").addClass('red');
			    	}
		    		$("#principaTelephone2").html(data[0].projectOrganizationVersion2.principaTelephone);
		    		if(data[0].projectOrganizationVersion1.principaTelephone!=data[0].projectOrganizationVersion2.principaTelephone) {
			    		$("#principaTelephone2").addClass('red');
			    	}
		    		$("#principaPhone2").html(data[0].projectOrganizationVersion2.principaPhone);
		    		if(data[0].projectOrganizationVersion1.principaPhone!=data[0].projectOrganizationVersion2.principaPhone) {
			    		$("#principaPhone2").addClass('red');
			    	}
		    		$("#principaEmail2").html(data[0].projectOrganizationVersion2.principaEmail);
		    		if(data[0].projectOrganizationVersion1.principaEmail!=data[0].projectOrganizationVersion2.principaEmail) {
			    		$("#principaEmail2").addClass('red');
			    	}
		    	}
		    	
		    	// 伦理审查信息
		    	if(data[0].projectEthicVersion2!=null) {
		    		$("#ethicName2").html(data[0].projectEthicVersion2.name);
		    		if(data[0].projectEthicVersion1.name!=data[0].projectEthicVersion2.name) {
			    		$("#ethicName2").addClass('red');
			    	}
		    		if(data[0].projectEthicVersion2.isRecords=='1') {
		    			$("#isRecords2").html("是");
		    		}else if(data[0].projectEthicVersion2.isRecords=='0') {
		    			$("#isRecords2").html("否");
		    		}
		    		if(data[0].projectEthicVersion1.isRecords!=data[0].projectEthicVersion2.isRecords) {
			    		$("#isRecords2").addClass('red');
			    	}
		    		$("#provinceCode2").html(data[0].projectEthicProvinceName2);
		    		if(data[0].projectEthicProvinceName1!=data[0].projectEthicProvinceName2) {
			    		$("#provinceCode2").addClass('red');
			    	}
		    		$("#auditDate2").html(data[0].projectEthicVersion2.auditDate);
		    		if(data[0].projectEthicVersion1.auditDate!=data[0].projectEthicVersion2.auditDate) {
			    		$("#auditDate2").addClass('red');
			    	}
		    		$("#approvalNumber2").html(data[0].projectEthicVersion2.approvalNumber);
		    		if(data[0].projectEthicVersion1.approvalNumber!=data[0].projectEthicVersion2.approvalNumber) {
			    		$("#approvalNumber2").addClass('red');
			    	}
		    		$("#ethicTelephone2").html(data[0].projectEthicVersion2.telephone);
		    		if(data[0].projectEthicVersion1.telephone!=data[0].projectEthicVersion2.telephone) {
			    		$("#ethicTelephone2").addClass('red');
			    	}
		    		$("#ethicEmail2").html(data[0].projectEthicVersion2.email);
		    		if(data[0].projectEthicVersion1.email!=data[0].projectEthicVersion2.email) {
			    		$("#ethicEmail2").addClass('red');
			    	}
		    		if(data[0].projectEthicVersion2.approvalFilePath!='') {
		    			$("#tteeFilePath_span2").html('<a href="' + data[0].projectEthicVersion2.approvalFilePath + '" target="_blank" >查看附件</a>');
		    		}
		    		
		    	}
		    	// 研究设计信息
		    	$("#researchPurpose2").html(data[0].projectVersion2.researchPurpose);
		    	if(data[0].projectVersion1.researchPurpose!=data[0].projectVersion2.researchPurpose) {
		    		$("#researchPurpose2").addClass('red');
		    	}
		    	$("#researchScheme2").html(data[0].projectVersion2.researchScheme);
		    	if(data[0].projectVersion1.researchScheme!=data[0].projectVersion2.researchScheme) {
		    		$("#researchScheme2").addClass('red');
		    	}
		    	$("#researchType2").html(data[0].projectVersion2.researchType);
		    	if(data[0].projectVersion1.researchType!=data[0].projectVersion2.researchType) {
		    		$("#researchType2").addClass('red');
		    	}
		    	
		    	if(data[0].projectVersion2.researchType=='观察性研究') {
		    		$("#ul_researchType_gc2").show();
		    		$("#researchDesignTimer2").html(data[0].projectVersion2.researchDesignTimer);
		    	}else if(data[0].projectVersion2.researchType=='干预性研究') {
		    		// 组信息列表
		    		$("#div_group_domain2").show();
		    		var group_domainStr = '<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>研究小组信息 &gt;&gt;</DIV>';
		    		if(data[0].projectGroupVersionList2!=null) {
			    		$(data[0].projectGroupVersionList2).each(function(i) {
			    			group_domainStr += '<ul class="class_researchType_gy" style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
										      + '<li class="name">组别名称：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList2[i].groupName
										      + '</li>'
										      + '<li class="name">满足条件：</li>'
										      + '<li class="inpu">'
										      +  data[0].projectGroupVersionList2[i].groupConditions
										      + '</li>'
										      + '<li class="name">干预类型：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList2[i].interventionType
										      + '</li>'
										      + '<li class="name">干预措施：</li>'
										      + '<li class="inpu">'
										      + data[0].projectGroupVersionList2[i].interventionMeasures
										      + '</li>'
										    + '</ul>'
			    		});
			    	}
			    	$("#div_group_domain2").html(group_domainStr);
		    	}else if(data[0].projectVersion2.researchType=='其他') {
		    		$("#ul_researchType_qt2").show();
		    		$("#researchTypeInfo2").html(data[0].projectVersion2.researchTypeInfo);
		    	}
		    	
		    	$("#researchDesignStartAndEnd2").html(data[0].projectVersion2.researchDesignStart + " 至 " + data[0].projectVersion2.researchDesignEnd);
		    	// 研究领域
		    	var researchDomainStr2 = '';
		    	var researchDomainSecStr2 = '';
		    	// 判断一级
		    	if(data[0].projectVersion2.researchDomain=='1001') {
		    		researchDomainStr2='基础医学';
		    	}else if(data[0].projectVersion2.researchDomain=='1002') {
		    		researchDomainStr2='临床医学';
		    	}else if(data[0].projectVersion2.researchDomain=='1003') {
		    		researchDomainStr2='口腔医学';
		    	}else if(data[0].projectVersion2.researchDomain=='1004') {
		    		researchDomainStr2='公共卫生与预防医学';
		    	}else if(data[0].projectVersion2.researchDomain=='1005') {
		    		researchDomainStr2='中医学';
		    	}else if(data[0].projectVersion2.researchDomain=='1006') {
		    		researchDomainStr2='中西医结合';
		    	}else if(data[0].projectVersion2.researchDomain=='1007') {
		    		researchDomainStr2='药学';
		    	}else if(data[0].projectVersion2.researchDomain=='1008') {
		    		researchDomainStr2='中药学';
		    	}
		    	// 判断二级
		    	if(data[0].projectVersion2.researchDomainSec=='100101') {researchDomainSecStr2='人体解剖与组织胚胎学';}
				else if(data[0].projectVersion2.researchDomainSec=='100102') {researchDomainSecStr2='免疫学';}
				else if(data[0].projectVersion2.researchDomainSec=='100103') {researchDomainSecStr2='病原生物学';}
				else if(data[0].projectVersion2.researchDomainSec=='100104') {researchDomainSecStr2='病理学与病理生理学';}
				else if(data[0].projectVersion2.researchDomainSec=='100105') {researchDomainSecStr2='法医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100106') {researchDomainSecStr2='放射医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100107') {researchDomainSecStr2='航空、航天与航海医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100201') {researchDomainSecStr2='内科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100202') {researchDomainSecStr2='儿科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100203') {researchDomainSecStr2='老年医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100204') {researchDomainSecStr2='神经病学';}
				else if(data[0].projectVersion2.researchDomainSec=='100205') {researchDomainSecStr2='精神病与精神卫生学';}
				else if(data[0].projectVersion2.researchDomainSec=='100206') {researchDomainSecStr2='皮肤病与性病学';}
				else if(data[0].projectVersion2.researchDomainSec=='100207') {researchDomainSecStr2='影像医学与核医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100208') {researchDomainSecStr2='临床检验诊断学';}
				else if(data[0].projectVersion2.researchDomainSec=='100209') {researchDomainSecStr2='护理学';}
				else if(data[0].projectVersion2.researchDomainSec=='100210') {researchDomainSecStr2='外科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100211') {researchDomainSecStr2='妇产科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100212') {researchDomainSecStr2='眼科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100213') {researchDomainSecStr2='耳鼻咽喉科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100214') {researchDomainSecStr2='肿瘤学';}
				else if(data[0].projectVersion2.researchDomainSec=='100215') {researchDomainSecStr2='康复医学与理疗学';}
				else if(data[0].projectVersion2.researchDomainSec=='100216') {researchDomainSecStr2='运动医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100217') {researchDomainSecStr2='麻醉学';}
				else if(data[0].projectVersion2.researchDomainSec=='100218') {researchDomainSecStr2='急诊医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100301') {researchDomainSecStr2='口腔基础医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100302') {researchDomainSecStr2='口腔临床医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100401') {researchDomainSecStr2='流行病与卫生统计学';}
				else if(data[0].projectVersion2.researchDomainSec=='100402') {researchDomainSecStr2='劳动卫生与环境卫生学';}
				else if(data[0].projectVersion2.researchDomainSec=='100403') {researchDomainSecStr2='营养与食品卫生学';}
				else if(data[0].projectVersion2.researchDomainSec=='100404') {researchDomainSecStr2='儿少卫生与妇幼保健学';}
				else if(data[0].projectVersion2.researchDomainSec=='100405') {researchDomainSecStr2='卫生毒理学';}
				else if(data[0].projectVersion2.researchDomainSec=='100406') {researchDomainSecStr2='军事预防医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100501') {researchDomainSecStr2='中医基础理论';}
				else if(data[0].projectVersion2.researchDomainSec=='100502') {researchDomainSecStr2='中医临床基础';}
				else if(data[0].projectVersion2.researchDomainSec=='100503') {researchDomainSecStr2='中医医史文献';}
				else if(data[0].projectVersion2.researchDomainSec=='100504') {researchDomainSecStr2='方剂学';}
				else if(data[0].projectVersion2.researchDomainSec=='100505') {researchDomainSecStr2='中医诊断学';}
				else if(data[0].projectVersion2.researchDomainSec=='100506') {researchDomainSecStr2='中医内科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100507') {researchDomainSecStr2='中医外科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100508') {researchDomainSecStr2='中医骨伤科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100509') {researchDomainSecStr2='中医妇科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100510') {researchDomainSecStr2='中医儿科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100511') {researchDomainSecStr2='中医五官科学';}
				else if(data[0].projectVersion2.researchDomainSec=='100512') {researchDomainSecStr2='针灸推拿学';}
				else if(data[0].projectVersion2.researchDomainSec=='100513') {researchDomainSecStr2='民族医学';}
				else if(data[0].projectVersion2.researchDomainSec=='100601') {researchDomainSecStr2='中西医结合基础';}
				else if(data[0].projectVersion2.researchDomainSec=='100602') {researchDomainSecStr2='中西医结合临床';}
				else if(data[0].projectVersion2.researchDomainSec=='100701') {researchDomainSecStr2='药物化学';}
				else if(data[0].projectVersion2.researchDomainSec=='100702') {researchDomainSecStr2='药剂学';}
				else if(data[0].projectVersion2.researchDomainSec=='100703') {researchDomainSecStr2='生药学';}
				else if(data[0].projectVersion2.researchDomainSec=='100704') {researchDomainSecStr2='药物分析学';}
				else if(data[0].projectVersion2.researchDomainSec=='100705') {researchDomainSecStr2='微生物与生化药学';}
				else if(data[0].projectVersion2.researchDomainSec=='100706') {researchDomainSecStr2='药理学';}
		    	
		    	if(researchDomainSecStr2!='') {
		    		$("#researchDomain2").html(researchDomainStr2 + " &nbsp;&nbsp; 二级学科：" + researchDomainSecStr2);
		    	}else {
		    		$("#researchDomain2").html(researchDomainStr2);
		    	}
		    	
		    	// 主要结局指标信息
		    	if(data[0].projectIndicatorMainVersion2!=null) {
		    		$("#indicatorNameMain2").html(data[0].projectIndicatorMainVersion2.indicatorName);
		    		if(data[0].projectIndicatorMainVersion1.indicatorName!=data[0].projectIndicatorMainVersion2.indicatorName) {
			    		$("#indicatorNameMain2").addClass('red');
			    	}
    			  	$("#indicatorDescriptionMain2").html(data[0].projectIndicatorMainVersion2.indicatorDescription);
    			  	if(data[0].projectIndicatorMainVersion1.indicatorDescription!=data[0].projectIndicatorMainVersion2.indicatorDescription) {
			    		$("#indicatorDescriptionMain2").addClass('red');
			    	}
    			  	$("#indicatorTypeMain2").html(data[0].projectIndicatorMainVersion2.indicatorType);
    			  	if(data[0].projectIndicatorMainVersion1.indicatorType!=data[0].projectIndicatorMainVersion2.indicatorType) {
			    		$("#indicatorTypeMain2").addClass('red');
			    	}
		    	}
		    	// 次要结局指标信息
		    	var ciyao_domainStr2='';
		    	if(data[0].projectIndicatorListMinorVersion2!=null) {
		    		if(data[0].projectIndicatorListMinorVersion2.length>0) {
		    			ciyao_domainStr2+='<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>次要结局指标 &gt;&gt;</DIV>';
		    		}
		    		$(data[0].projectIndicatorListMinorVersion2).each(function(i) {
		    		  ciyao_domainStr2 +='<ul style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
									  +'<li class="name">结局指标名称：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion2[i].indicatorName
									  +'</li>'
									  +'<li class="name">结局指标描述：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion2[i].indicatorDescription
									  +'</li>'
									  +'<li class="name">结局指标类型：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListMinorVersion2[i].indicatorType   
									  +'</li>'
									  +'</ul>';
		    		});
		    	}
		    	$("#div_ciyao_indicator_domain2").html(ciyao_domainStr2);
		    	// 其他结局指标信息
		    	var qita_domainStr2='';
		    	if(data[0].projectIndicatorListElseVersion2!=null) {
		    		if(data[0].projectIndicatorListElseVersion2.length>0) {
		    			qita_domainStr2+='<DIV style="MARGIN-TOP: 10px" class=zhibiaoTitle>其他结局指标 &gt;&gt;</DIV>';
		    		}
		    		$(data[0].projectIndicatorListElseVersion2).each(function(i) {
		    			 qita_domainStr2 +='<ul style="background-color: #EEEED1; padding-top: 15px; padding-bottom: 15px;">'
									  +'<li class="name">结局指标名称：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion2[i].indicatorName
									  +'</li>'
									  +'<li class="name">结局指标描述：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion2[i].indicatorDescription
									  +'</li>'
									  +'<li class="name">结局指标类型：</li>'
									  +'<li class="inpu">'
									  + data[0].projectIndicatorListElseVersion2[i].indicatorType   
									  +'</li>'
									  +'</ul>';
		    		});
		    	}
		    	$("#div_qita_indicator_domain2").html(qita_domainStr2);
		    	
		    	//研究对象信息
		    	$("#researchDesignTimer2").html(data[0].projectVersion2.researchDesignTimer);
		    	if(data[0].projectVersion1.researchDesignTimer!=data[0].projectVersion2.researchDesignTimer) {
		    		$("#researchDesignTimer2").addClass('red');
		    	}
		    	$("#researchObjectInfo2").html(data[0].projectVersion2.researchObjectInfo);
		    	if(data[0].projectVersion1.researchObjectInfo!=data[0].projectVersion2.researchObjectInfo) {
		    		$("#researchObjectInfo2").addClass('red');
		    	}
		    	$("#researchObjectSample2").html(data[0].projectVersion2.researchObjectSample);
		    	if(data[0].projectVersion1.researchObjectSample!=data[0].projectVersion2.researchObjectSample) {
		    		$("#researchObjectSample2").addClass('red');
		    	}
		    	$("#inclusionCriteria2").html(data[0].projectVersion2.inclusionCriteria);
		    	if(data[0].projectVersion1.inclusionCriteria!=data[0].projectVersion2.inclusionCriteria) {
		    		$("#inclusionCriteria2").addClass('red');
		    	}
		    	$("#exclusionCriteria2").html(data[0].projectVersion2.exclusionCriteria);
		    	if(data[0].projectVersion1.exclusionCriteria!=data[0].projectVersion2.exclusionCriteria) {
		    		$("#exclusionCriteria2").addClass('red');
		    	}
		    	$("#sexPreference2").html(data[0].projectVersion2.sexPreference);
		    	if(data[0].projectVersion1.sexPreference!=data[0].projectVersion2.sexPreference) {
		    		$("#sexPreference2").addClass('red');
		    	}
		    	$("#minAge2").html(data[0].projectVersion2.minAge);
		    	if(data[0].projectVersion1.minAge!=data[0].projectVersion2.minAge) {
		    		$("#minAge2").addClass('red');
		    	}
		    	$("#maxAge2").html(data[0].projectVersion2.maxAge);
		    	if(data[0].projectVersion1.maxAge!=data[0].projectVersion2.maxAge) {
		    		$("#maxAge2").addClass('red');
		    	}
		    	// 招募状态
		    	var researchObjectStatus2 = '';
		    	if(data[0].projectVersion2.researchObjectStatus=='0') {
		    		researchObjectStatus2 = '未开始募集';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='1') {
		    		researchObjectStatus2 = '正在募集中';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='2') {
		    		researchObjectStatus2 = '正在邀请以确定的研究对象入选，而不公开募集';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='3') {
		    		researchObjectStatus2 = '项目进行中，但不再募集研究对象';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='4') {
		    		researchObjectStatus2 = '项目已结束';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='5') {
		    		researchObjectStatus2 = '募集被中断暂停，之后可能继续';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='6') {
		    		researchObjectStatus2 = '募集被中止，之后不会继续';
		    	}else if(data[0].projectVersion2.researchObjectStatus=='7') {
		    		researchObjectStatus2 = '募集被取消';
		    	}
		    	$("#researchObjectStatus2").html(researchObjectStatus2);
		    	if(data[0].projectVersion1.researchObjectStatus!=data[0].projectVersion2.researchObjectStatus) {
		    		$("#researchObjectStatus2").addClass('red');
		    	}
		    	
		    	$("#researchObjectStart2").html(data[0].projectVersion2.researchObjectStart);
		    	if(data[0].projectVersion1.researchObjectStart!=data[0].projectVersion2.researchObjectStart) {
		    		$("#researchObjectStart2").addClass('red');
		    	}
		    	$("#researchObjectEnd2").html(data[0].projectVersion2.researchObjectEnd);
		    	if(data[0].projectVersion1.researchObjectEnd!=data[0].projectVersion2.researchObjectEnd) {
		    		$("#researchObjectEnd2").addClass('red');
		    	}
		    	$("#sampleType2").html(data[0].projectVersion2.sampleType);
		    	if(data[0].projectVersion1.sampleType!=data[0].projectVersion2.sampleType) {
		    		$("#sampleType2").addClass('red');
		    	}
		    	$("#sampleInfo2").html(data[0].projectVersion2.sampleInfo);
		    	if(data[0].projectVersion1.sampleInfo!=data[0].projectVersion2.sampleInfo) {
		    		$("#sampleInfo2").addClass('red');
		    	}
		    	// 其他信息
		    	$("#websiteName2").html(data[0].projectVersion2.websiteName);
		    	if(data[0].projectVersion1.websiteName!=data[0].projectVersion2.websiteName) {
		    		$("#websiteName2").addClass('red');
		    	}
		    	$("#websiteUrl2").html(data[0].projectVersion2.websiteUrl);
		    	if(data[0].projectVersion1.websiteUrl!=data[0].projectVersion2.websiteUrl) {
		    		$("#websiteUrl2").addClass('red');
		    	}
		    	$("#thesisType2").html(data[0].projectVersion2.thesisType);
		    	if(data[0].projectVersion1.thesisType!=data[0].projectVersion2.thesisType) {
		    		$("#thesisType2").addClass('red');
		    	}
		    	if(data[0].projectVersion2.thesisFilePath!='') {
		    		$("#thesisFilePath_span2").html('<a href="' + data[0].projectVersion2.thesisFilePath + '" target="_blank" >查看附件</a>');
		    	}
		    	if(data[0].projectVersion2.isStemCellProjects!=null && data[0].projectVersion2.isStemCellProjects=='1') {
		    		$("#isStemCellProjects2").html("是");
		    	}else {
		    		$("#isStemCellProjects2").html("否");
		    	}
		    	if(data[0].projectVersion1.isStemCellProjects!=data[0].projectVersion2.isStemCellProjects) {
		    		$("#isStemCellProjects2").addClass('red');
		    	}
		    	//
		    	
		     }
		},
		error : function() {
			alert("通信失败！");
		}
	 });
	
}